package cn.java86.test2;

import cn.java86.dao.StudentDao;
import cn.java86.entity.Student;
import cn.java86.util.MybatisUtil;
import cn.java86.util.StrUtil;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.cache.impl.PerpetualCache;
import java.util.List;
import java.util.Map;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestStudentQuery {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();
        StudentDao mapper = s.getMapper(StudentDao.class);

        //List<Student> list=mapper.paging(1,20,"李",null, StrUtil.toDate("2017-1-1"),null);
        //List<Student> list=mapper.paging(1,20,null,"138", StrUtil.toDate("2017-1-1"),null);
        List<Student> list=mapper.paging(1,20,null,"","", null,null);
        for(Student st:list){
            System.out.println(st);
        }

        MybatisUtil.close(s);
    }
}
